package club.cearnach.api.service;

import club.cearnach.entity.Actor;
import club.cearnach.api.form.PageBean;

import java.util.HashSet;
import java.util.List;
import java.util.Optional;

/**
 * @author 阮胜
 * @date 2018/5/12 17:02
 */
public interface IActorService {
    Actor save(Actor actor);

    Actor saveAndFlush(Actor actor);

    Optional<Actor> findByName(String name);

    HashSet<Actor> saveMany(String actors);

    Optional<Actor> findByPersonId(Integer id);

    void delete(Integer id);

    Optional<Actor> findById(Integer id);

    List<Actor> findAllByOrderByUpdateDateDesc(PageBean pageBean);
}
